﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "IAward" here, you must also update the reference to "IAward" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IAward
    {
        [OperationContract]
        DataSet Award_GetOne(int AwardID);

        [OperationContract]
        DataSet Award_GetAll();

        [OperationContract]
        DataSet Award_GetList(out int ItemCount, int currentPage, int pageSize, int BranchID, int DepartmentID, string keyword, int _year);

        [OperationContract]
        AwardInfo Award_GetInfo(int AwardID);

        [OperationContract]
        bool Award_CheckExistEmployee(int EmployeeID, int month, int year);

        [OperationContract]
        AwardInfo Award_GetInfoEmployee(int EmployeeID);

        [OperationContract]
        DataSet Award_GetAllByEmployee(int employeeid);

        [OperationContract]
        int Award_Insert(AwardInfo eInfo);

        [OperationContract]
        bool Award_Update(AwardInfo eInfo);
        
        [OperationContract]
        DataSet AwardExp_GetByAwardID(int AwardID);
        
        [OperationContract]
        int AwardExp_Insert(AwardExpInfo eInfo);

        [OperationContract]
        bool AwardExp_Delete(int AwardID);

        [OperationContract]
        AwardExpInfo AwardExp_GetInfo(int AwardID, int MisconductID);

        [OperationContract]
        bool Award_Delete(int AwardID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class AwardInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        DateTime _Date;
        [DataMember]
        public DateTime Date
        {
            get { return _Date; }
            set { _Date = value; }
        }
       
        string _TypeContent;
        [DataMember]
        public string TypeContent
        {
            get { return _TypeContent; }
            set { _TypeContent = value; }
        }
        string _Detail;
        [DataMember]
        public string Detail
        {
            get { return _Detail; }
            set { _Detail = value; }
        }
        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }

        string _Type;
        [DataMember]
        public string Type
        {
            get { return _Type; }
            set { _Type = value; }
        }
        decimal _Amount;
        [DataMember]
        public decimal Amount
        {
            get { return _Amount; }
            set { _Amount = value; }
        }
        string _No;
        [DataMember]
        public string No
        {
            get { return _No; }
            set { _No = value; }
        }
    }
   
    [DataContract(Namespace = "http://HRMService")]
    public class AwardExpInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        int _AwardID;
        [DataMember]
        public int AwardID
        {
            get { return _AwardID; }
            set { _AwardID = value; }
        }
        int _MisconductID;
        [DataMember]
        public int MisconductID
        {
            get { return _MisconductID; }
            set { _MisconductID = value; }
        }
    }

}

